import {handleActions} from 'redux-actions'
import {GET_USERINFO,ANSWER_COUNT} from '../types/index'

export default handleActions({
  [GET_USERINFO](state,action) {
    return {
      ...state,
      info: action.payload
    }
  },[ANSWER_COUNT](state,action) {
    return {
      ...state,
      answerCount: action.payload
    }
  }
}, {
  info: null,
  answerCount:0
})
